package com.ruyuan.process.engine.processor;

import com.ruyuan.process.engine.process.DynamicProcessor;
import com.ruyuan.process.engine.process.ProcessContext;

/**
 * 儒猿课堂: http://www.ruyuan2020.com
 * @Author zhonghuashishan
 * @Remark 有问题直接联系客服VX: ruyuan-1111 ，源码-笔记-技术交流群
 * @Version 1.0
 **/
public class DynamicProcessorDemo extends DynamicProcessor {

    private String id;
    private String nextId;

    public DynamicProcessorDemo(String id, String nextId) {
        this.id = id;
        this.nextId = nextId;
    }

    @Override
    protected void processInternal(ProcessContext context) {
        System.out.println("DynamicProcess " + id);
    }

    @Override
    protected String nextNodeId(ProcessContext context) {
        return nextId;
    }
}
